//
//  AKRequestManager.h
//  CocoaBean
//
//  Created by sleeper on 5/20/10.
//  Copyright 2010 __MyCompany__ All rights reserved.
//

@class AKRequest;
@class GDataOAuthAuthentication;
@protocol AKRequestDelegate;

@interface AKRequestManager : NSObject {
	NSOperationQueue *_queue;
	GDataOAuthAuthentication *_auth;
	
	NSMutableDictionary *_delegateLookUp;
}

- (id)initWithAuthentication:(GDataOAuthAuthentication *)auth;
- (void)runRequest:(AKRequest*)request delegate:(id <AKRequestDelegate>)aDelegate;
- (void)runRequest:(AKRequest*)request delegate:(id <AKRequestDelegate>)aDelegate cancelRequestsWithSameType:(BOOL)flag;

// This method is normally called in the delegate's dealloc method, so as to prevent sending message to a deallocated delegate.
- (BOOL)removeDelegate:(id <AKRequestDelegate>)aDelegate;

@end
